<!DOCTYPE html>
<!--杨景文-->
<html lang="zh_CN">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta charset="UTF-8">
    <title>用户登录界面</title>
    <link rel="stylesheet" th:href="@{/css/login.css}" href="style.css">
</head>
<body>
<div class="container">
    <div class="panel">
        <div class="content">
            <div class="switch">
                <h1 id="login">登录</h1>
            </div>

            <form  th:action="@{/login}"method="post">

                <div id="userName" class="input" aria-placeholder="用户名"><input type="text" name="username"></div>
                <div id="password" class="input" aria-placeholder="密码"><input type="password" name="password"></div>

                <p>
                    <a id="signUp" href="register" class="input">跳转注册</a>
                    <span>|</span>
                    <a id="forget" href="UserRetrieve.html" class="input">忘记密码？</a>
                </p>
                <button class="button">登录</button>
            </form>
        </div>
    </div>
</div>
</body>

<script th:src="@{https://cdn.bootcss.com/jquery/3.4.1/jquery.slim.js}"></script>
<script>

    $('.input input').on('focus',function () {
        $(this).parent().addClass('focus');
    })

    $('.input input').on('blur',function () {
        if($(this).val() === '')
            $(this).parent().removeClass('focus');
    })
</script>
</html>